#pragma once
#include "Dllexport.h"
#include "math.h"
namespace NBGUI
{
	//this is for drawing any rectangles , which is divided into 3x3 grid
	struct GUIAPI Grid3x3 
	{
		enum 
		{
			TOPLEFT = 0,
			TOPMID,
			TOPRIGHT,
			MIDLEFT,
			MIDMID,
			MIDRIGHT,
			BOTTOMLEFT,
			BOTTOMMID,
			BOTTOMRIGHT
		};
		Rect grid[9];
		Grid3x3(int edgeX, int edgeY, int wholeX, int wholeY):edgeWidth(edgeX),edgeHeight(edgeY),width(wholeX),height(wholeY)
		{
			grid[0] = Rect(0,0,edgeX,edgeY);
			grid[1] = Rect(edgeX,0,wholeX - 2*edgeX,edgeY);
			grid[2] = Rect(wholeX - edgeX,0,edgeX,edgeY);

			grid[3] = Rect(0,edgeY,edgeX,wholeY - 2*edgeY);
			grid[4] = Rect(edgeX,edgeY,wholeX - 2*edgeX,wholeY - 2*edgeY);
			grid[5] = Rect(wholeX-edgeX,edgeY,edgeX,wholeY - 2*edgeY);

			grid[6] = Rect(0,wholeX - edgeX,edgeX,edgeY);
			grid[7] = Rect(edgeX,wholeX - edgeY,wholeX - 2*edgeX,edgeY);
			grid[8] = Rect(wholeX - edgeX,wholeY - edgeY,edgeX,edgeY);
		}

		int edgeWidth,edgeHeight,width,height;


		//layout like this
		//0 1 2
		//3 4 5
		//6 7 8

	};

}